package com.wys.read.exception;

/**
 * 枚举
 */
public enum FrameErrorCodeEnums implements IErrorCode {

    /**
     * 枚举
     */
    SUCCESS(0, "处理成功"),
    SERVER_INTERNAL_ERROR(-1, "服务器内部错误"),
    UNKNOWN_ERROR(-100, "未知错误"),
    DB_ERROR(-101, "数据库错误"),
    UNAUTHORIZED_URL(401, "未授权URL"),
    BIND_ARGS_ERROR(403, "参数绑定异常");

    private Integer code;
    private String msg;

    FrameErrorCodeEnums(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    public IErrorCode setMsg(String msg) {
        this.msg = msg;
        return this;
    }
}
